package org.example.pojo3;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Data
@NoArgsConstructor
@Scope("prototype") // 深拷贝

public class Animal {
    //@Value("熊猫")
    private String name;

    public Animal(String name) {
        this.name = name;
    }
}
